const express = require("express");
const router = express.Router();
const userHandler = require("../handler/user");

const expressJoi = require("@escook/express-joi");
const { regLoginSchema } = require("../schema/user");

// 注册新用户
router.post("/reguser", expressJoi(regLoginSchema), userHandler.reguser);
// 登录
router.post("/login", expressJoi(regLoginSchema), userHandler.login);

module.exports = router;
